<?php 
// Mage/ApiBundle/Form/Type
 
namespace Mage\ApiBundle\Form\Type;
 
use Symfony\Component\Form\AbstractType as FormAbstractType;
use Symfony\Component\Form\FormBuilder;
use Symfony\Component\Form\FormView;
use Symfony\Component\Form\FormInterface;
//use Symfony\Component\Form\FormBuilderInterface;

use Symfony\Component\OptionsResolver\OptionsResolverInterface;




class CatType extends FormAbstractType
{

	
	/**
	 * {@inheritDoc}
	 * For Symfony 2.1 and higher
	 */
	public function setDefaultOptions(OptionsResolverInterface $resolver)
	{
		$resolver->setDefaults(array(
				'string'         => '',
		));
	}
	
	/**
	 * {@inheritDoc}
	 */
	public function buildView(FormView $view, FormInterface $form, array $options)
	{
		// For Symfony 2.0:
		//$view->set('string', $form->getAttribute('string'));
	
		// For Symfony 2.1 and higher:
		$view->vars['string'] = $options['string'];
	}
	
// 	/**
// 	 * {@inheritDoc}
// 	 */
// 	public function buildForm(Symfony\Component\Form\FormBuilder $builder, array $options)
// 	{
		
// 		$builder
// 		->setAttribute('string', $options['string'])
// 		;
// 	}	
	
	/**
     * @author  Joe Sexton <joe@webtipblog.com>
     * @return  string
     */
    public function getName()
    {
        return 'cat';
    }
 
    /**
     * @author  Joe Sexton <joe@webtipblog.com>
     * @return  string
     */
    public function getParent()
    {
        return 'checkbox';
    }
}